package lab02.test06;

public class Ladder {
    Double upperbase;
    Double thebottom;
    Double height;
    Double area;
    Ladder(Double upperbase, Double thebottom, Double height, Double area){
        this.upperbase=upperbase;
        this.thebottom=thebottom;
        this.height=height;
    }
    double area(){
        area=(upperbase+thebottom)*height/2;
        System.out.println("地形的面积是："+area);
        return area;
    }

}
